import Vue from 'vue'
import VueRouter from 'vue-router'
import LoginView from '@/views/LoginView.vue'
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/login',
    component: LoginView
  },
  {
    path: '/login',
    name: 'login',
    component: () => import('@/views/LoginView.vue')
  },
  {
    path: '/',
    redirect: '/home',
    component: () => import('@/layout/layout.vue'),
    children: [
      {
        path: '/home',
        name: 'home',
        component: () => import('@/views/HomeView.vue'),
      },
      
      {
        path: '/rydkjl',
        name: 'rydkjl',
        component: () => import('@/views/rydkjl.vue'),
      },
      {
        path: '/rydk',
        name: 'rydk',
        component: () => import('@/views/rydk.vue'),
      },
      {
        path: '/yhgl',
        name: 'yhgl',
        component: () => import('@/views/yhgl.vue'),
      },
      
      {
        path: '/mq',
        name: 'mq',
        component: () => import('@/views/mq.vue'),
      },
      {
        path: '/qzhz',
        name: 'qzhz',
        component: () => import('@/views/qzhz.vue'),
      },
      {
        path: '/swgl',
        name: 'swgl',
        component: () => import('@/views/swgl.vue'),
      },
      {
        path: '/zygl',
        name: 'zygl',
        component: () => import('@/views/zygl.vue'),
      },

      
    ]
  },
  {
    path: '/loan',
    redirect: '/loan-input/index',
    component: () => import('@/layout/layout.vue'),
    children: [
      {
        meta: {
          title: '密切接触者管理'
        },
        path: '/loan-input/index',
        name: '/loan-input',
        component: () => import('@/views/loan/IndexView.vue'),
      },
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
